package com.monster.dict.domain.dto;

import com.monster.dict.domain.common.DictItemValidGroup;
import com.monster.valid.annotation.ValidEnum;
import com.monster.valid.annotation.ValidMonster;
import com.monster.valid.regex.RegexEnum;
import lombok.Data;

/**
 * 字典项目新增实体
 * @author kuang
 */
@Data
public class DictItemUpdateDto {
    /**
     * 数据id
     */
    @ValidMonster(name = "数据id", value =  RegexEnum.ENGLISH_NUMBER,isNull = false, max = 25, min = 15)
    private String id;
    /**
     * 字典项值
     */
    @ValidMonster(name = "字典项值", value = RegexEnum.CHINESE_ENGLISH_NUMBER, isNull = false, max = 16, groups = DictItemValidGroup.Group.Value.class)
    private String value;
    /**
     * 字典项名称
     */
    @ValidMonster(name = "字典项名称", value = RegexEnum.CHINESE_ENGLISH_NUMBER, specials = {"_", ","}, isNull = false, max = 16, groups = DictItemValidGroup.Group.Name.class)
    private String name;
    /**
     * 是否固定
     */
    @ValidEnum(name = "锁定状态", valueEnum = {"0", "1"}, isNull = false, groups = DictItemValidGroup.Group.LockState.class)
    private Integer lockState;
    /**
     * 详细描述
     */
    @ValidMonster(name = "字典项描述", value = RegexEnum.CHINESE_ENGLISH_NUMBER, specials = {"_", ",", "，"}, max = 50, groups = DictItemValidGroup.Group.Detail.class)
    private String detail;
    /**
     * 版本信息
     */
    private Long version;

}
